<%@ page language="java" import="java.util.*"%>
<script language="JavaScript">
function keepMeAlive()
{
if (document.getElementById('keepAliveIMG'))
{
document.getElementById('keepAliveIMG').src = '../plugins/LookandFeel/style/images/arrowpulldown.gif?x=' + escape(new Date());
}
}
</script>

<% String User = (String)session.getAttribute("UserDetails"); 

   System.out.println("User is "+(String)session.getAttribute("UserName"));
   User="Amit Mudgal";
%>
 
<style type="text/css">






.styleGuideTab1
{
	color: #4e4e4e;
    background-color: #FAFAFA;
    font-family: Arial;
    font-size: 11px;
    font-weight: bold;
    padding-left: 16px;
    padding-right:16px;
}
.styleGuideTab1 A:hover
{
color: #4e4e4e;
text-decoration: underline;
}




    
.styleGuideTab2
{
	color: #4e4e4e;
    background-color: #EDEDED;
    font-family: Arial;
    font-size: 11px;
    font-weight: bold;
    padding-left: 16px;
    padding-right:16px;
}
.styleGuideTab2 A:hover
{
color: #4e4e4e;
text-decoration: underline;
}
.styleGuideTab3
{
	color: #4e4e4e;
    background-color: #FAFAFA;
    font-family: Arial;
    font-size: 11px;
    font-weight: bold;
    padding-left: 20px;
    padding-right:20px;
}
.styleGuideTab3 A:hover
{
color: #4e4e4e;
text-decoration: underline;
}
.styleGuideTab4
{
	color: #4b4b4b;
    font-family: Arial;
    font-size: 10px;
    font-weight: bold;
    padding-top: 5px;
    padding-bottom:5px;
    padding-right:20px;
} 
#dropmenudiv{
color: #4e4e4e;
position:absolute;
border:1px solid black;
border-bottom-width: 0;
font:normal 11px Arial;
line-height:18px;
z-index:100;
}

#dropmenudiv a{
background-color: #EDEDED;
color: #4e4e4e;
width: 100%;
display: block;
text-indent: 0px;
text-align: left;
border-bottom: 1px solid black;
padding: 1px 0;
text-decoration: none;
font-weight: bold;
}

#dropmenudiv a:hover{ /*hover background color*/
background-color: #EDEDED;
}

.timertext {
 text-color:#4b4b4b;
 font-family: Arial;
 font-size: 10px;
 font-weight: bold;
}
#input_box { background-color:#F4F4F4; font-family: Arial;    font-size: 10px; color: #4b4b4b; }
</style>

<script type="text/javascript" language="javascript">

function openDataDictNewWindow()
{
window.open("/giid/gmis-documents/Welcome to MARC.htm");
}
function openFAQNewWindow()
{
//window.open("/giid/gmis-documents/R1_Report_FAQs.doc");
document.location.href="https://central269.intra.aexp.com/confluence/display/mcsdkb/MARC"	
}
function openNetworkPrivacy()
{
document.location.href="notes://148.173.242.113/Apps/N_Dir/NetworkPrivacyPolicyTeam.nsf";
}
function openMSTRGuide()
{
window.open("/giid/gmis-documents/MOLT TOC 101909.htm");
}
function EditProfile()
{
	document.location.href="../plugins/LookandFeel/jsp/PageUnderConstruction.jsp" ;
}
function RequestException()
{
	document.location.href="/giid/ExceptionReason.do" ;
}
function RequestDelegateAccess() //delegate req 003
{
	document.location.href="/giid/requestDelegateAccess.do?action=fetchdelegateDetails" ;
}

function RequestDelegatEextensionAccess() //delegate req 003
{
	document.location.href="/giid/requestDelegateAccess.do?action=requestDelegationExtension" ;
}

function openBusinesGlossary1()
{
//window.open("http://e3etldomain.ipc.us.aexp.com:9080/bg",'mystylewindow');
	window.open("/giid/jsp/customizedPages/BusinessGlossary.jsp",'mystylewindow1');
}

//KDB change start
function callGmarLink(GMARLink)
{
	document.getElementById('theForm').action = "../jsp/customizedPages/" +document.getElementById(GMARLink).title + ".jsp";
	document.getElementById('theForm').submit();
}

//Contents for menu MARC
var menuMARC=new Array();
menuMARC[0]='<a href="../plugins/LookandFeel/jsp/GMARKnowledgeDatabaseFAQ.jsp?userName="<%=User%> onclick="callGmarLink(this.id)" target="_blank" id="picklist1" title="GMARKnowledgeDatabaseFAQ">GMAR Knowledge Database FAQ</a>';
//menuMARC[1]='<a href="#" onclick="callGmarLink(this.id)" id="picklist2" title="GMAReLearningCourses">GMAR eLearning Courses</>';
menuMARC[1]='<a href="../plugins/LookandFeel/jsp/GMARProductDocuments.jsp" onclick="callGmarLink(this.id)" target="_blank" id="picklist2"  title="GMARProductDocuments">GMAR Product Documents</a>';
menuMARC[2]='<a href="http://agpma502.gso.aexp.com/bg/login.jsp" target="_blank" title="GMAR Business Glossary">GMAR Business Glossary</a>';
menuMARC[3]='<a href="https://square.aexp.com/BusinessUnits/GlobalMerchantServices/MerchantServicesAmericas/AboutMSAmericas/Pages/MerchantforceWelcomePage.aspx" target="_blank" title="MerchantForce Link">MerchantForce Link</a>';
menuMARC[4]='<a href="../plugins/LookandFeel/Lang_1033/MicroStrategy_Web_Help.htm" target="_new" title="MicroStrategy Web Help">MicroStrategy Web Help</a>';
menuMARC[5]='<a href="https://teams.aexp.com/sites/marc_documents_library/_layouts/WordViewer.aspx?id=/sites/marc_documents_library/Shared%20Documents/GMAR%20Training%20Calendar/GMAR%20Training%20Calendar.docx&Source=https%3A%2F%2Fteams%2Eaexp%2Ecom%2Fsites%2Fmarc_documents_library%2Fdefault%2Easpx%3FRootFolder%3D%252Fsites%252Fmarc%255Fdocuments%255Flibrary%252FShared%2520Documents%252FGMAR%2520Training%2520Calendar%26FolderCTID%3D0x012000114868573269AF49BFEB15A8B9A28994%26View%3D%7B47A300F7-CD2D-4B1C-A4EC-CAC08CCF13E6%7D%26InitialTabId%3DRibbon%252EDocument%26VisibilityContext%3DWSSTabPersistence&DefaultItemOpen=1" target="_blank" title="GMAR Training Calendar">GMAR Training Calendar</a>'

//Contents for menu Dashboard
var menuD=new Array();
menuD[0]='<a href="https://central269.intra.aexp.com/confluence/display/mcsdkb/Dashboard+Application" target="_blank" title="Wiki/Self-Help Documents">Wiki/Self-Help Documents</a>';
menuD[1]='<a href="../help/WebUser/WebHelp/Lang_1033/MicroStrategy_Web_Help.htm" target="_new">MSTR Web Help</a>';

//Contents for menu ICARD
var menuI=new Array();
menuI[0]='<a href="https://central269.intra.aexp.com/confluence/display/mcsdkb/ICARD" target="_blank" title="Wiki/Self-Help Documents">Wiki/Self-Help Documents</a>';
menuI[1]='<a href="../help/WebUser/WebHelp/Lang_1033/MicroStrategy_Web_Help.htm" target="_new">MSTR Web Help</a>';

//Contents Menu with Out of Box link
var menuM=new Array();
menuM[0]='<a href="../help/WebUser/WebHelp/Lang_1033/MicroStrategy_Web_Help.htm" target="_new">MSTR Web Help</a>';


var menu2=new Array();
menu2[0]='<a href="javascript:EditProfile()" title="Edit User Profile">Edit Profile</a>';
//menu2[1]='<a href="javascript:RequestException()" title="Request Exception Access">Request Exception Access</a>';
// Taken out by Amit Mudgal (MicroStrategy Principal Consultant) on 4/29/2014 as business wants to discontinue this functionality
//Added changes for Req 19 CLM Full Launch
//Start

//Ends	
var menuwidth='400px'; //default menu width
var menubgcolor='#EDEDED';  //menu bgcolor
var disappeardelay=250;  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes"; //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth);
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}
function dropdownmenu1(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue1()
}
function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}
function clickreturnvalue1(){
if (ie4||ns6) return false
else return true
}
function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu

function delayhidemenu1(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}
//script for Session Timer

timedouturl = "../plugins/CustomSecurity/jsp/logoutTemplate.jsp";
function Minutes(data) {
for (var i = 0; i < data.length; i++)
if (data.substring(i, i + 1) == ":")
break;
return (data.substring(0, i));
}
function Seconds(data) {
for (var i = 0; i < data.length; i++)
if (data.substring(i, i + 1) == ":")
break;
return (data.substring(i + 1, data.length));
}
function Display(min, sec) {
var disp;
if (min <= 9) disp = " 0";
else disp = " ";
disp += min + ":";
if (sec <= 9) disp += "0" + sec;
else disp += sec; 
return (disp);
}
function Down() { 
sec--;      
if (sec == -1) { sec = 59; min--; }
document.timerform.clock.value = Display(min, sec);
window.status = "Session Expires in: " + Display(min, sec);
if (min == 0 && sec == 0) {
//alert("Your session has timed out.");
window.location.href = timedouturl;
}
else down = setTimeout("Down()", 1000);
}
function timeIt() {

min = 1 * Minutes(document.timerform.clock.value);
sec = 0 + Seconds(document.timerform.clock.value);
Down();
}
function timeItFrom(frommin, fromsec)
{
//alert("Inside timeItFrom");
//alert(document.timerform.clock.value);
min = 1 * frommin;
//alert("min == "+min);
sec = 0 + fromsec;
//alert("min == "+min);
//alert("sec == "+sec);
Down();
}
//window.onload = timeIt



</script>
<%
 /****
  * Generic_ShortcutsBar.jsp
  * This file includes the default content of the shorcuts bar section.
  * This consist on the toolbar link, a search box, and logout and help links.
  *
  * Copyright 2004 MicroStrategy Incorporated. All rights reserved.
  * version: 1.2
  * xhtml: true
  ****/
%><%@ page errorPage="JSP_Error.jsp"
%><%@ page contentType="text/html; charset=UTF-8"
%><%@ taglib uri="/WEB-INF/tlds/webUtilTL.tld" prefix="web"
%>
<%-- Render the toolbar section if the user has a session. --%>


<!-- KDB changes start here -->


<TABLE width="100%" bgcolor="#F4F4F4" height="100">

	<tr>

		<td rowspan="3" nowrap="nowrap" align="center">
				<web:ifConnectionValue property="projectName" value="MARC">
			   	<web:then>
						<img src="../plugins/LookandFeel/style/images/MarcLogo.png" width="100" height="80">
				</web:then>
				<web:else>
						<img src="../plugins/LookandFeel/style/images/Amex_Blue.png" width="80" height="70">
				</web:else>
				</web:ifConnectionValue>
		</td>
		<td nowrap="nowrap" align="right">
		
		
		
		
		
		<table width="100%">
			<tr NOWRAP>
			<td width=96%> 
			<br />
			</td>
			
				
			<%
				Object ObjMCSTypeCd = session.getAttribute("MCSTypeCd");
				String MCSTypeCd="";
				if(ObjMCSTypeCd != null)
					{
						MCSTypeCd = ObjMCSTypeCd.toString();
					}
				if("02".equals(MCSTypeCd))
				{
			%>
			<td class=styleGuideTab2 NOWRAP width=1%>
			<a href="/giid/UserManager.do" >User Manager</a>
			</td>
			<%
				}
			%>
			
			<td class=styleGuideTab1 NOWRAP width=1%>
	
                <!--  This is for the users who have access to edit their preferences-->
                <web:ifFeature name="preferences"><web:then>
                 <span ><a href="mstrWeb?evt=3041&src=mstrWeb.3041&group=general" onclick="return submitLink(this, event);" class="mstrLink">Preferences</a> </span>
                     <span> | </span>
                </web:then></web:ifFeature>
                <!--  This is for the bulk upload feature , present only for the Web Administrator users-->
                 <web:ifFeature name="preferences"><web:then>
                 <span ><a href="mstrWeb?pg=CSVBulkUploadPage">CSV User Bulk Upload</a> </span>
                     <span> | </span>
                </web:then></web:ifFeature>
                
				 <span ><a href="default.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu2, '120px')" onMouseout="delayhidemenu()">User Profile <img src="../plugins/LookandFeel/style/images/1arrow_down.gif" alt="arrowdown"/> </a> </span>
				</td>

				 <td class=styleGuideTab2 NOWRAP width=1%>
					<web:ifConnectionValue property="projectName" value="MARC">
						<web:then>
							<span ><a href="default.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menuMARC, '180px')" onMouseout="delayhidemenu()">Knowledge Database<img src="../plugins/LookandFeel/style/images/1arrow_down.gif" alt="arrowdown"/></a></span>
						</web:then>

					</web:ifConnectionValue>
					<web:ifConnectionValue property="projectName" value="Dashboard">
						<web:then>
							<span ><a href="default.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menuD, '180px')" onMouseout="delayhidemenu()">Knowledge Database<img src="../plugins/LookandFeel/style/images/1arrow_down.gif" alt="arrowdown"/></a> </span>
						</web:then>
					</web:ifConnectionValue>
					<web:ifConnectionValue property="projectName" value="ICARD">
						<web:then>
							<span ><a href="default.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menuI, '180px')" onMouseout="delayhidemenu()">Knowledge Database<img src="../plugins/LookandFeel/style/images/1arrow_down.gif"/></a> </span>
						</web:then>
					</web:ifConnectionValue>

					<web:ifConnectionValue property="projectName" value="GMAPS Project E3 - Sep07 Optimizations" >
						<web:then>
							<span ><a href="default.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menuM, '180px')" onMouseout="delayhidemenu()">Knowledge Database<img src="../plugins/LookandFeel/style/images/1arrow_down.gif" alt="arrowdown"/></a> </span>
						</web:then>
					</web:ifConnectionValue>		
					<web:ifConnectionValue property="projectName" value="Enterprise Manager" >
						<web:then>
							<span ><a href="default.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menuM, '180px')" onMouseout="delayhidemenu()">Knowledge Database<img src="../plugins/LookandFeel/style/images/1arrow_down.gif" alt="arrowdown"/></a> </span>
						</web:then>
					</web:ifConnectionValue>										
			</td> 
			<td class=styleGuideTab3 NOWRAP width=1%>
			
			<%-- Display a URL pointing to eTrainer.--%>
			<%@include file='/plugins/LookandFeel/jsp/eTrainer_Section.jsp' %>
			<%-- Render the logout button if the user has a session. --%>
			<web:ifConnectionValue>
				<web:then>
					<web:ifFeature type="requestKey" name="mstrwid"><web:then></web:then><web:else>
					<web:descriptor key="mstrWeb.859" desc="Welcome" /> <b> <web:connectionValue property="userName"/></b>,&nbsp
					<span ><web:urlEvent eventID="com.microstrategy.web.app.beans.EnumServletEvents.WebEventLogout"><web:descriptor key="mstrWeb.8" desc="Logout" /></web:urlEvent></span>
					</web:else></web:ifFeature>
				</web:then>
			</web:ifConnectionValue>
			
			</td>
			</tr>
			
			</table>
			
			
		 </td>
	</tr>
	<tr>
		<td class=styleGuideTab4 align="right" nowrap="nowrap" height=20>
			<form name="timerform">
				Session Expires in:<input type="text" id="input_box" name="clock" size="3" value="30:00" style="border: 1px solid #F4F4F4">
			</form>
		</td>
			
	</tr>
	<tr>

		<td align="right" nowrap="nowrap">

			<!-- Commented by Amit Mudgal (MicroStrategy Professional Services) on 4/11/2014  <web:ifConnectionValue>
			<web:then>
				<web:ifFeature name="object-search">
					<web:then>
						<web:quickSearch/>
					</web:then>
				</web:ifFeature>
			</web:then>
			</web:ifConnectionValue>
			-->
			<img id="keepAliveIMG" width="1" height="1" src="../plugins/LookandFeel/style/images/arrowpulldown.gif?" /> 
		</td>

	</tr>
</TABLE>
<jsp:include page="Header.jsp"></jsp:include>
<script>
timeIt();
</script>